#ifndef COMMONPI_H_
#define COMMONPI_H_

int walkDirPI(char *path, char *relPath, char * snd_fifo, char * rcv_fifo);

ssize_t writen(int fd, const void *vptr, size_t n);
ssize_t readn(int fd, void *vptr, size_t n);

void sndFifoAns(char * fifo, int code);
int rcvFifoAns(char * fifo);

/* Envia Informacion */
int send_data_fifo (int fd, char * s_msg, int size);


int readsize (int fd);
int readcom (int fd);
int readcomChPI (char * pipe);
int readcomID (char * pipe);


int snd_file_fifo (char * snd_fifo, char * rcv_fifo, char * fname, int isdir);

#endif /*COMMONPI_H_*/
